import ajax from '@/utils/ajax'

/**
 * @module 油站信息
 */

// 分页获取油站列表
export const getGasList = params => ajax.post('gasInfo/getGasInfoList', params)

// 获取用户名下所有油站
export const getAllGasInfoList = params => ajax.post('gasInfo/getAllGasInfoList', params)

// 获取商户信息
export const getCompanyInfo = params => ajax.post('gasInfo/getCompanyInfo', params)

// 修改油站详情
export const updateGasInfo = params => ajax.post('gasInfo/updateGasInfo', params)

// 油站标签
export const getTags = params => ajax.post('gasInfo/getBindSelfTags', params)

// 营业状态
export const getBusinessStatus = params => ajax.post('gasInfo/getBusinessStatus', params)

// 获取地理位置标识
export const getGasLocationType = params => ajax.post('gasInfo/getGasLocationType', params)

// 暂时关闭油站
export const closeGasInfo = params => ajax.post('gasInfo/closeGasInfo', params)

/**
 * @module 油枪管理
 */

// 油枪列表
export const getGasGunList = params => ajax.post('gasInfo/getGasGunList', params)

// 新增油枪
export const addGasGun = params => ajax.post('gasInfo/addGasGun', params)

// 启用/禁用油枪
export const openGasGun = params => ajax.post('gasInfo/toOpenGun', params)

// 获取修改弹窗的油号, 暂时用不到
export const getGasGunById = params => ajax.get('gasInfo/getGasGunById', params)

// 提交修改弹窗油号
export const updateGasGun = params => ajax.post('gasInfo/updateGasGun', params)

// 获取变更记录
export const oilGunLog = params => ajax.post('gasInfo/viewOilGunLog', params)

// 油号列表
export const getOilNumList = params => ajax.post('gasInfo/getOilNumList', params)

/**
 * @module 油价管理
 */

// 油价列表
export const getGasPriceList = params => ajax.post('gasInfo/getOilPriceByPage', params)

// 提交修改油价
export const updateOilPrice = params => ajax.post('oilPrice/updateOilPrice', params)

// 修改记录
export const checkLog = params => ajax.post('gasInfo/viewOilPriceLog', params)

/**
 * @module 营业时间
 */

// 获取营业时间
export const getBusinessHour = params => ajax.post('gasInfo/getGasBusinessHour', params)

// 设置营业时间
export const setBusinessHour = params => ajax.post('gasInfo/updateGasBusinessHour', params)
